<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>02-结构伪类_06-nth-of-type</title>
    <style>
        /*span:first-child {
            color: red;
        }*/

        /*span:only-child {
            color: red;
        }*/

        span:only-of-type {
            color: red;
        }
    </style>
</head>
<body>

<div>
    <p>12</p>
    <span>span1</span>
</div>

</body>
</html>